<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--sweetalert2-->
    <link href="./sweetalert2/dist/sweetalert2.min.css" rel="stylesheet">
    <script src="./sweetalert2/dist/sweetalert2.min.js" type="text/javascript"></script>
</head>
<body>


<script>

//输入email 自带校验

    async  function fn(){
        const { value: email } = await Swal.fire({
            title: 'Input email address',
            input: 'email',
            inputLabel: 'Your email address',
            inputPlaceholder: 'Enter your email address'
        })

        if (email) {
            Swal.fire(`Entered email: ${email}`)
        }
    }


    fn()
</script>
</body>
</html>